package casa.depesos.app.com.http.data;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.NonNull;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

public class CardInfo implements Parcelable {

    @SerializedName("identitcode")
    @Expose
    public String id;

    @SerializedName("fsurname")
    @Expose
    public String fName;

    @SerializedName("msurname")
    @Expose
    public String mName;

    @SerializedName(value = "appel", alternate = {"nam"})
    @Expose
    public String name;

    @SerializedName("frontPic")
    @Expose
    public String front;

    @SerializedName("backPic")
    @Expose
    public String back;

    public CardInfo() {

    }

    protected CardInfo(Parcel in) {
        id = in.readString();
        fName = in.readString();
        mName = in.readString();
        name = in.readString();
        front = in.readString();
        back = in.readString();
    }

    public static final Creator<CardInfo> CREATOR = new Creator<CardInfo>() {
        @Override
        public CardInfo createFromParcel(Parcel in) {
            return new CardInfo(in);
        }

        @Override
        public CardInfo[] newArray(int size) {
            return new CardInfo[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(fName);
        dest.writeString(mName);
        dest.writeString(name);
        dest.writeString(front);
        dest.writeString(back);
    }
}
